//
//  AXMyAddMedicamentCell.m
//  AnXin100
//
//  Created by 天质弘耕 on 2018/11/12.
//  Copyright © 2018 tzhg. All rights reserved.
//
/** 添加药剂名称cell */

#import "AXMyAddMedicamentCell.h"

@implementation AXMyAddMedicamentCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self creatView];
        [self setlayout];
    }
    return self;
}

- (void)creatView {
    
    self.bgView = [[UIView alloc]init];
    self.bgView.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.bgView];
    
    self.yjmcView = [[UIView alloc]init];
    self.yjmcView.borderWidth = 1;
    self.yjmcView.borderColor = COLOR_LINE;
    [self.bgView addSubview:self.yjmcView];
    
    self.yjmcLabel = [[UILabel alloc]init];
    self.yjmcLabel.font = FONT_FOURTEEN;
    self.yjmcLabel.textColor = COLOR_DIV;
    [self.yjmcView addSubview:self.yjmcLabel];
    
    self.syltView = [[UIView alloc]init];
    self.syltView .borderWidth = 1;
    self.syltView .borderColor = COLOR_LINE;
    [self.bgView addSubview:self.syltView ];
    
    self.sylLabel = [[UILabel alloc]init];
    self.sylLabel.font = FONT_FOURTEEN;
    self.sylLabel.textColor = COLOR_DIV;
    [self.syltView addSubview:self.sylLabel];
    
    
    self.addBtn = [[UIButton alloc]init];
    [self.addBtn setImage:[UIImage imageNamed:@"yjAdd"] forState:UIControlStateNormal];
    [self.bgView addSubview:self.addBtn];
    
}

- (void)setlayout {
    
    
    self.bgView.sd_layout
    .leftSpaceToView(self.contentView, 0)
    .topSpaceToView(self.contentView, 0)
    .widthIs(SCREEN_WIDTH)
    .heightIs(100);
    
    self.addBtn.sd_layout
    .rightSpaceToView(self.bgView, 10)
    .centerYEqualToView(self.bgView)
    .widthIs(30)
    .heightIs(30);
    
    
    self.yjmcView.sd_layout
    .leftSpaceToView(self.bgView, 10)
    .topSpaceToView(self.bgView, 6)
    .widthIs(SCREEN_WIDTH-70)
    .heightIs(44);
    
    self.yjmcLabel.sd_layout
    .leftSpaceToView(self.yjmcView, 10)
    .topSpaceToView(self.yjmcView, 7)
    .widthIs(SCREEN_WIDTH-40)
    .heightIs(30);
    
    self.syltView.sd_layout
    .leftSpaceToView(self.bgView, 10)
    .topSpaceToView(self.yjmcView, 1)
    .widthIs(SCREEN_WIDTH-70)
    .heightIs(44);
    
    self.sylLabel.sd_layout
    .leftSpaceToView(self.syltView, 10)
    .topSpaceToView(self.syltView, 7)
    .widthIs(SCREEN_WIDTH-40)
    .heightIs(30);
    
    
}

@end
